package vip.xiaonuo.core.pojo.response;


/**
 * 返回结果
 *
 * @author yaorw
 */
public class ResponseWrapper {


    /**
     * 成功
     */
    private final static SuccessResponseData SUCCESS = new SuccessResponseData();

    private ResponseWrapper() {

    }

    public static SuccessResponseData success() {
        return SUCCESS;
    }

    public static SuccessResponseData success(Object object) {
        return new SuccessResponseData(object);
    }

    public static SuccessResponseData success(Integer code, String message, Object object) {
        return new SuccessResponseData(code, message, object);
    }

    public static ErrorResponseData error(String message) {
        return new ErrorResponseData(message);
    }

    public static ErrorResponseData error(Integer code, String message) {
        return new ErrorResponseData(code, message);
    }

    public static ErrorResponseData error(Integer code, String message, Object object) {
        return new ErrorResponseData(code, message, object);
    }

}
